package nioDemo.client;

import java.io.IOException;
import java.net.Socket;

public class ClientDemo {
    public static void main(String[] args) {
        //创建一个socket连接
        try (Socket socket = new Socket("127.0.0.1", 8080);) {
            System.out.println(socket);
            socket.getOutputStream().write("hellow world".getBytes());
            System.in.read();
        } catch (IOException e) {

        }
    }
}
